<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<table cellspacing="0" cellpadding="0" border="0" width="100%">
	<tr valign="top">
		<td width="100%" align="right">
			<table cellspacing="0" cellpadding="0" border="0" width="100%">
				<tr valign="top">
					<td class="padding1112px">
						<table cellspacing="0" cellpadding="0" border="0" width="100%" style="background: url(<s:url value="/images/bottombg.jpg"/>) repeat-x bottom left">
							<tr valign="top">
								<td style="background: url(<s:url value="/images/leftbg.jpg"/>) repeat-y top right"><img src="<s:url value="/images/leftbgtop.jpg"/>" border="0" alt=""></td>
								<td width="70%" style="background: url(<s:url value="/images/topbg2.jpg"/>) repeat-x top left; padding: 17px 15px 10px 16px">
									<div align="center" style="height: 100%;">
										<div class="vehicleDataDiv">
											<div class="showingInfoDiv_title">
												<s:if test="(#session.usersListSearch != null || #session.usersListSearch.size>0)">
													<s:text name="admin.search.vehicle.myVehicles"/>
								                </s:if>
								                <s:else>
													<s:text name="admin.search.vehicle.noVehiclesFound"/>
												</s:else>
											</div>
											<div style="width:100%;height: 100%;">
												<s:if test="(#session.usersListSearch != null || #session.usersListSearch.size>0)">  
								                    <table class="" cellspacing="0" cellpadding="0" border="0" width="100%" >
								                    	<tr>
								                    		<td class="vehicleSearchResultTitle" style="border: 3px solid #4D2929;font-weight: bold;font-size: 12px;"> # </td>
								                    		<td class="vehicleSearchResultTitle" style="border: 3px solid #4D2929;font-weight: bold;font-size: 12px;"> ID </td>
								                    		<td class="vehicleSearchResultTitle" style="border: 3px solid #4D2929;font-weight: bold;font-size: 12px;"> ID JEFE</td>
								                    		<td class="vehicleSearchResultTitle" style="border: 3px solid #4D2929;font-weight: bold;font-size: 12px;"> USER </td>
								                    		<td class="vehicleSearchResultTitle" style="border: 3px solid #4D2929;font-weight: bold;font-size: 12px;"> NOMBRE </td>
								                    		<td class="vehicleSearchResultTitle" style="border: 3px solid #4D2929;font-weight: bold;font-size: 12px;"> APELLIDO PAT </td>
								                    		<td class="vehicleSearchResultTitle" style="border: 3px solid #4D2929;font-weight: bold;font-size: 12px;"> APPELIDO MAT </td>
								                    		<td class="vehicleSearchResultTitle" style="border: 3px solid #4D2929;font-weight: bold;font-size: 12px;"> EMAIL </td>
								                    		<td class="vehicleSearchResultTitle" style="border: 3px solid #4D2929;font-weight: bold;font-size: 12px;"> ROL </td>
								                    		<td class="vehicleSearchResultTitle" style="border: 3px solid #4D2929;font-weight: bold;font-size: 12px;"> GENERO </td>
								                    		<td class="vehicleSearchResultTitle" style="border: 3px solid #4D2929;font-weight: bold;font-size: 12px;"> TEL TRABAJO </td>
								                    		<td class="vehicleSearchResultTitle" style="border: 3px solid #4D2929;font-weight: bold;font-size: 12px;"> TEL CASA </td>
								                    		<td class="vehicleSearchResultTitle" style="border: 3px solid #4D2929;font-weight: bold;font-size: 12px;"> ACCIONES </td>
								                    	</tr>
								                    	<s:iterator value="#session.usersListSearch" status="usersListStatus">
								                    		<tr>
								                    			<td style="border: 1px solid #4D2929;font-size: 11px;"><s:property value="#usersListStatus.index +1" /> </td>
									                    		<td style="border: 1px solid #4D2929;font-size: 11px;"><a href="/VentaAutopartes/userSearch/searchUserById.action?userId=<s:property value="userId"/>"><s:property value="userId"/></a>  </td>
									                    		<td style="border: 1px solid #4D2929;font-size: 11px;" title="<s:property value="boss.userId"/> - <s:property value="boss.name"/> <s:property value="boss.lastName"/> <s:property value="boss.Surame"/>" ><a  href="/VentaAutopartes/userSearch/searchUserById.action?userId=<s:property value="boss.userId"/>"><s:property value="boss.userId"/></a>  </td>
									                    		<td style="border: 1px solid #4D2929;font-size: 11px;"><a href="/VentaAutopartes/userSearch/searchUserById.action?userId=<s:property value="userId"/>"><s:property value="user"/></a>  </td>
									                    		<td style="border: 1px solid #4D2929;font-size: 11px;"> <s:property value="name"/> </td>
									                    		<td style="border: 1px solid #4D2929;font-size: 11px;"> <s:property value="lastName"/> </td>
									                    		<td style="border: 1px solid #4D2929;font-size: 11px;"> <s:property value="surName"/> </td>
									                    		<td style="border: 1px solid #4D2929;font-size: 11px;"> <s:property value="email"/> </td>
									                    		<td style="border: 1px solid #4D2929;font-size: 11px;"> <s:property value="userBranch.branchUserRole.branchUserRole"/> </td>
									                    		<td style="border: 1px solid #4D2929;font-size: 11px;"> <s:property value="gender.gender"/> </td>
									                    		<td style="border: 1px solid #4D2929;font-size: 11px;">
									             
									                    			<s:iterator value="phoneContact.phoneList">
									                    				
									                    				<s:if test="(phoneNumber != null && phoneType=='WORK TELEPHONE' || phoneType=='OFFICE')">
																			<s:property value="phoneNumber"/><br>
														                </s:if>
														            
									                    			</s:iterator> 
									                    		</td>
									                    		<td style="border: 1px solid #4D2929;font-size: 11px;">
									                    			<s:iterator value="phoneContact.phoneList">
									                    				<s:if test="(phoneNumber != null && phoneType=='HOME TELEPHONE' || phoneType=='CELL PHONE')">
																			<s:property value="phoneNumber"/><br>
														                </s:if>
														              
									                    			</s:iterator>
									                    		</td>
									                    		<td style="border: 1px solid #4D2929;font-size: 11px;">
									                    			<ul id="icons" class="ui-widget ui-helper-clearfix">
									                    				<li class="ui-state-default ui-corner-all" title="Editar"><a class="ui-icon ui-icon-pencil" href="/VentaAutopartes/userSearch/updateUserDetailsById.action?userId=<s:property value="userId"/>"></a></li>
									                    				<li class="ui-state-default ui-corner-all" title="Eliminar">
									                    					<s:if test="(subordinates.size()>0)">
									                    						<a class="ui-icon ui-icon-trash" href="#" onclick="javascript:alert('No puede eliminar este usuario ya que tiene asignado personal a su cargo');"></a>
									                    					</s:if>
									                    					<s:else>
									                    						<a class="ui-icon ui-icon-trash" href="/VentaAutopartes/userSearch/deleteUserById.action?userId=<s:property value="userId"/>"></a>
									                    					</s:else>
									                    					
									                    				</li>
									                    			</ul>
									                    		</td>
								                    		</tr>
								                    		<s:if test="(subordinates.size>0) && #session.user.userPrivilage.userPrivilage=='SUPERADMINISTRATOR'">
								                    			<s:include value="/jsp/tiles/private/administrator/body/search/user/recursiveNodeSubordinates.jsp"> </s:include>
								                    
								                    		</s:if>
														</s:iterator> 
													</table>
								                </s:if>
												
											</div>
										</div>
									</div>								
								</td>
								<td style="background: url(<s:url value="/images/rightbg.jpg"/>) repeat-y top left"><img src="<s:url value="/images/rightbgtop.jpg"/>" border="0" alt=""></td>	
								
							</tr>
							<tr>
								<td colspan="3" style="background: url(<s:url value="/images/bottombg.jpg"/>) repeat-x top left"><img src="<s:url value="/images/spacer.gif"/>" width="410" height="1" border="0" alt=""></td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>